<template>
  <view>
    <u-navbar title="个人资料" height="50" title-size="26">
      <view
        slot="right"
        @click="routeTo('/other_center/conruct-team-setting-edit/conruct-team-setting-edit')"
      >
        <view style="margin-right: 20rpx"> 修改资料 </view>
      </view>
    </u-navbar>
    <view class="view-box">
      <view class="view-item">
        <view class="title"> 真实姓名 </view>
        <view class="info">
          {{ userInfo.name }}
        </view>
      </view>
      <view class="view-item">
        <view class="title"> 性别 </view>
        <view class="info">
          {{ userInfo.sex ? '男' : '女' }}
        </view>
      </view>
      <view class="view-item">
        <view class="title"> 生日 </view>
        <view class="info">
          {{ userInfo.birthday }}
        </view>
      </view>
    </view>

    <view class="view-box">
      <view class="view-item">
        <view class="title"> 工作经验 </view>
        <view class="info"> {{ userInfo.workYear }}年 </view>
      </view>
      <view class="view-item">
        <view class="title"> 期望工作地址 </view>
        <view class="info">
          {{ userInfo.exceptWorkArea }}
        </view>
      </view>
      <view class="view-item">
        <view class="title"> 联系电话 </view>
        <view class="info">
          {{ userInfo.mobile }}
        </view>
      </view>
      <view class="view-item2">
        <view class="title"> 个人简介 </view>
        <view class="info">
          {{ userInfo.content }}
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      userInfo: {}
    }
  },
  onShow() {
    this.$u.get('/app-api/construction/resume/get').then((res) => {
      this.userInfo = res.data
    })
  },
  methods: {
    routeTo(url) {
      uni.navigateTo({
        url
      })
    }
  }
}
</script>

<style>
page {
  background-color: #f2f2f2;
}
.view-box {
  background-color: #fff;
  margin: 20rpx 0;
}
.view-item {
  display: flex;
  border-bottom: #ededed solid 2rpx;
  padding: 30rpx;
}
.title {
  flex: 1;
}
.view-item2 {
  padding: 20rpx;
  line-height: 55rpx;
}
</style>
